/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package sv.com.compassion.entidades;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;
import javax.xml.bind.annotation.XmlRootElement;

/** Clase entidad para el mapeo de tabla de base de datos Nota
* @author grupo de Tesis
*/
@Entity
@Table(name = "nota")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Nota.findAll", query = "SELECT n FROM Nota n"),
    @NamedQuery(name = "Nota.findByIdNota", query = "SELECT n FROM Nota n WHERE n.idNota = :idNota"),
    @NamedQuery(name = "Nota.findByMatNota", query = "SELECT n FROM Nota n WHERE n.matNota = :matNota"),
    @NamedQuery(name = "Nota.findByFecFinGrado", query = "SELECT n FROM Nota n WHERE n.fecFinGrado = :fecFinGrado"),
    @NamedQuery(name = "Nota.findByAprobado", query = "SELECT n FROM Nota n WHERE n.aprobado = :aprobado"),
    @NamedQuery(name = "Nota.findByEstNota", query = "SELECT n FROM Nota n WHERE n.estNota = :estNota"),
    @NamedQuery(name = "Nota.findByAuAddUsr", query = "SELECT n FROM Nota n WHERE n.auAddUsr = :auAddUsr"),
    @NamedQuery(name = "Nota.findByAuAddDat", query = "SELECT n FROM Nota n WHERE n.auAddDat = :auAddDat"),
    @NamedQuery(name = "Nota.findByAuModUsr", query = "SELECT n FROM Nota n WHERE n.auModUsr = :auModUsr"),
    @NamedQuery(name = "Nota.findByAuModDat", query = "SELECT n FROM Nota n WHERE n.auModDat = :auModDat"),
    @NamedQuery(name = "Nota.findBySocNota", query = "SELECT n FROM Nota n WHERE n.socNota = :socNota"),
    @NamedQuery(name = "Nota.findByNatNota", query = "SELECT n FROM Nota n WHERE n.natNota = :natNota"),
    @NamedQuery(name = "Nota.findByLenNota", query = "SELECT n FROM Nota n WHERE n.lenNota = :lenNota")})
public class Nota implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @NotNull
    @Column(name = "idNota")
    private Integer idNota;
    @Basic(optional = false)
    @NotNull
    @Column(name = "matNota")
    private float matNota;
    @Basic(optional = false)
    @NotNull
    @Column(name = "fecFinGrado")
    @Temporal(TemporalType.DATE)
    private Date fecFinGrado;
    @Basic(optional = false)
    @NotNull
    @Column(name = "aprobado")
    private int aprobado;
    @Basic(optional = false)
    @NotNull
    @Column(name = "estNota")
    private int estNota;
    @Basic(optional = false)
    @NotNull
    @Column(name = "AuAddUsr")
    private int auAddUsr;
    @Basic(optional = false)
    @NotNull
    @Column(name = "AuAddDat")
    @Temporal(TemporalType.DATE)
    private Date auAddDat;
    @Column(name = "AuModUsr")
    private Integer auModUsr;
    @Column(name = "AuModDat")
    @Temporal(TemporalType.DATE)
    private Date auModDat;
    @Basic(optional = false)
    @NotNull
    @Column(name = "socNota")
    private float socNota;
    @Basic(optional = false)
    @NotNull
    @Column(name = "natNota")
    private float natNota;
    @Basic(optional = false)
    @NotNull
    @Column(name = "lenNota")
    private float lenNota;
    @JoinColumn(name = "idNivelEscolaridad", referencedColumnName = "idNivelEscolaridad")
    @ManyToOne(optional = false)
    private Nivelescolaridad idNivelEscolaridad;
    @JoinColumn(name = "idBeneficiario", referencedColumnName = "idBeneficiario")
    @ManyToOne(optional = false)
    private Beneficiario idBeneficiario;

    public Nota() {
    }

    public Nota(Integer idNota) {
        this.idNota = idNota;
    }

    public Nota(Integer idNota, float matNota, Date fecFinGrado, int aprobado, int estNota, int auAddUsr, Date auAddDat, float socNota, float natNota, float lenNota) {
        this.idNota = idNota;
        this.matNota = matNota;
        this.fecFinGrado = fecFinGrado;
        this.aprobado = aprobado;
        this.estNota = estNota;
        this.auAddUsr = auAddUsr;
        this.auAddDat = auAddDat;
        this.socNota = socNota;
        this.natNota = natNota;
        this.lenNota = lenNota;
    }

    public Integer getIdNota() {
        return idNota;
    }

    public void setIdNota(Integer idNota) {
        this.idNota = idNota;
    }

    public float getMatNota() {
        return matNota;
    }

    public void setMatNota(float matNota) {
        this.matNota = matNota;
    }

    public Date getFecFinGrado() {
        return fecFinGrado;
    }

    public void setFecFinGrado(Date fecFinGrado) {
        this.fecFinGrado = fecFinGrado;
    }

    public int getAprobado() {
        return aprobado;
    }

    public void setAprobado(int aprobado) {
        this.aprobado = aprobado;
    }

    public int getEstNota() {
        return estNota;
    }

    public void setEstNota(int estNota) {
        this.estNota = estNota;
    }

    public int getAuAddUsr() {
        return auAddUsr;
    }

    public void setAuAddUsr(int auAddUsr) {
        this.auAddUsr = auAddUsr;
    }

    public Date getAuAddDat() {
        return auAddDat;
    }

    public void setAuAddDat(Date auAddDat) {
        this.auAddDat = auAddDat;
    }

    public Integer getAuModUsr() {
        return auModUsr;
    }

    public void setAuModUsr(Integer auModUsr) {
        this.auModUsr = auModUsr;
    }

    public Date getAuModDat() {
        return auModDat;
    }

    public void setAuModDat(Date auModDat) {
        this.auModDat = auModDat;
    }

    public float getSocNota() {
        return socNota;
    }

    public void setSocNota(float socNota) {
        this.socNota = socNota;
    }

    public float getNatNota() {
        return natNota;
    }

    public void setNatNota(float natNota) {
        this.natNota = natNota;
    }

    public float getLenNota() {
        return lenNota;
    }

    public void setLenNota(float lenNota) {
        this.lenNota = lenNota;
    }

    public Nivelescolaridad getIdNivelEscolaridad() {
        return idNivelEscolaridad;
    }

    public void setIdNivelEscolaridad(Nivelescolaridad idNivelEscolaridad) {
        this.idNivelEscolaridad = idNivelEscolaridad;
    }

    public Beneficiario getIdBeneficiario() {
        return idBeneficiario;
    }

    public void setIdBeneficiario(Beneficiario idBeneficiario) {
        this.idBeneficiario = idBeneficiario;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idNota != null ? idNota.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Nota)) {
            return false;
        }
        Nota other = (Nota) object;
        if ((this.idNota == null && other.idNota != null) || (this.idNota != null && !this.idNota.equals(other.idNota))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "sv.com.compassion.entidades.Nota[ idNota=" + idNota + " ]";
    }
    
}
